package com.zqx.sharestate.client;

import com.zqx.sharestate.context.Switch;

/**
 * description: 客户端测试类
 * @author zqx
 * @date 2018/09/04
 */
public class Client {
    public static void main(String[] args) {
        Switch s1,s2;
        s1 = new Switch("开关1");
        s2 = new Switch("开关2");
        s1.on();
        s2.on();
        s1.off();
        s2.off();
        s2.on();
        s1.on();
        //程序运行执行结果会出现s1关闭会联动s2关闭；s2打开联动s1打开
    }
}
